<template>
  <div class="breadItem">
    <span v-if="!to">
      <slot></slot>
    </span>
    <span v-if="to" :class="to ? 'colors' : ''">
      <slot></slot>
    </span>
    <!-- 后面添加上箭头符号 -->
    <i class="iconfont icon-angle-right"></i>
  </div>
</template>

<script>
export default {
  props: {
    to: {
      type: String,
    },
  },
};
</script>

<style lang="scss" scoped>
.icon-angle-right {
  margin: 0 8px;
}
.colors:hover {
  color: #27bb9a;
  cursor: pointer;
}
</style>
